package com.chaos.system.api.feign;


import com.chaos.framework.model.constant.FeignConstants;
import com.chaos.framework.model.dto.result.list.ListResult;
import com.chaos.system.api.constant.ServiceNameConstant;
import com.chaos.system.api.data.RbacUserData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Set;

/**
 * 管理员能力
 */
@FeignClient(name = ServiceNameConstant.SYSTEM_SERVICE)
public interface RbacUserFeign {

    @PostMapping(FeignConstants.FEIGN_PREFIX + "rbacUser/list")
    ListResult<RbacUserData> list(@RequestBody RbacUserData queryData);

    @PostMapping(FeignConstants.FEIGN_PREFIX + "rbacUser/initAdminPermission")
    void initAdminPermission();

    @PostMapping(FeignConstants.FEIGN_PREFIX + "rbacUser/selectRolesByUserId")
    Set<Long> selectRolesByUserId(@RequestBody RbacUserData queryData);
}

